package sketch.generator;

import java.util.List;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class PermutationValueGeneratorTest extends TestCase {

	public static Test suite() {
        return new TestSuite(PermutationValueGeneratorTest.class);
    }
	
	public void testPermutation() {
		PermutationValueGenerator<String> generator = new PermutationValueGenerator<String>("string1", "string2", "string3");
		int i = 0;
		while(generator.hasNextPermutation()) {
			i++;
			List<String> permutation = generator.nextPermutation();
			System.out.println(i + "th permutation:");
			for(String perm : permutation) {
				System.out.print(perm + "  ");
			}
			System.out.println();
		}
		assertTrue( i == 27);
	}
}
